//package com.lyt.springboot.controller;
//
//import com.lyt.springboot.TestMybatisApplication;
//import com.lyt.springboot.dao. OrderMapper;
//import com.lyt.springboot.domain.Order;
//import org.junit.Test;
//import org.junit.runner.RunWith;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.boot.test.context.SpringBootTest;
//import org.springframework.test.context.junit4.SpringRunner;
//
//
//import java.util.List;
//
//
//
//@RunWith(SpringRunner.class)
//@SpringBootTest(classes = TestMybatisApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) //classes是主类的启动名称
//public class ShardingjdbcTest {
//
//    @Autowired
//    private OrderMapper orderMapper;
//
//    @Test
//    public void save() {
//        for (int i = 0; i < 4; i++) {
//            Order order = new Order();
//            order.setUserId(100);
//            order.setOrderName("www");
//            orderMapper.insert(order);
//        }
//        for (int i = 0; i < 4; i++) {
//            Order order = new Order();
//            order.setUserId(200);
//            order.setOrderName("qqq");
//            orderMapper.insert(order);
//
//        }
//    }
//
//    @Test
//    public void selectOrderAll() {
//        List<Order> orders = orderMapper.selectAll();
////        orders.forEach(System.out::println);
//        orders.forEach(order -> System.out.println(order.getOrderId() + " " + order.getOrderName() + " " + order.getUserId()));
//    }
//}
